import axios from 'axios'

axios.defaults.baseURL = 'http://www.520gongfu.com:9527/api'


// 
export const getSliders = (callback) => {

    axios.get('/home/sliders').then(function(response) {
            // //console.log(response);
            callback && callback(response.data)
        })
        .catch(function(error) {
            //console.log(error);
        });

}


// 
export const homeCategory = (callback) => {
    axios.get('/home/category').then(function(res) {
        callback && callback(res.data)
    }).catch(err => {
        //console.log(err);
    })

}